libxc: xc_dom_parse_elf_kernel: Return error for invalid kernel images
authorSimon Gaiser <simon@invisiblethingslab.com>
Thu, 8 Feb 2018 21:49:10 +0000 (22:49 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 13 Feb 2018 11:48:43 +0000 (11:48 +0000)
commit37f1a96888f6022872213428cdc24060700aa9ba
tree0dfcc67691cb63ac89c366f8cc8896a2d052034e
parent1ab2cd70f2ea36da85ffa3f8a51453b49ea0996c
libxc: xc_dom_parse_elf_kernel: Return error for invalid kernel images

Commit 96edb111dd ("libxc: panic when trying to create a PVH guest
without kernel support") already improved the handling of non PVH
capable kernels. But xc_dom_parse_elf_kernel() still returned success on
invalid elf images and the domain build only failed later. Now the build
process will fail immediately on detecting the error.

Signed-off-by: Simon Gaiser <simon@invisiblethingslab.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
tools/libxc/xc_dom_elfloader.c